<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
	<title>修改资源</title>
</head>
<body>
	<h3>修改资源</h3>
<div style = "background: url(../images/menuBg.png) repeat fixed; height:420px">
	<form id="form">
		<input type="hidden" name="id" value="${resource.id}"/>
		<div class="content_row">
			<span class="row"><label><font color ="red">*</font>&nbsp;资源名称</label><input type="text" name="name" value="${resource.name}"/></span>
			<span class="row"><label>资源路径</label><input type="text" name="url" value="${resource.url}"/></span>
			<span class="row"><label>是否是菜单</label><select id="ismenu" class="easyui-combobox" name="ismenu" style="width:144px">
			    <option>是</option>
			    <option>否</option>
			</select></span>
		</div>
		<div class="content_row">
			<span class="row"><label>上级菜单</label><input type="text" id="parentId" name="parentId" style="width:144px"/></span>
			<span class="row"><label>菜单显示顺序</label><input type="text" name="posorder"  value="${resource.posorder}"/></span>
			<span class="row"><label>cssclass</label><input type="text" name="clsname" value="${resource.clsname}"/></span>
		</div>
		<div class="content_row">
			<span class="row"><label>权限字符串</label><input type="text" name="permission" value="${resource.permission}"/></span>
		</div>
		<div class="content_row content_row_btn">
			<a href="javascript:void(0)" onclick="submitForm('/user/updateResource.do','/user/listResourceView.do');" class="commonbtn">保存</a>
			<a href="javascript:void(0)" onclick="openUrl('/user/listResourceView.do');" class="commonbtn">返回</a>
		</div>
	</form>
</div>
<script type="text/javascript">
$(function(){
	$('#parentId').combotree({
	    url: '/user/getResourceTree.do'
	});
	setTimeout('init()', 100);
});

function init(){
	var ismenu = '${resource.ismenu}';
	$('#ismenu').combobox('setValue', ismenu);
	$('#parentId').combotree('setValue', '${resource.parentId}');
}
</script>
</body>
</html>
